$(function () {
    findAll();
})

function findAll() {
    let data = myAjax("/back/cuisine/findAll", {}, "get");
    let html = '';
    data = data.list;
    if (data != null) {
        for (let i = 0; i < data.length; i++) {
            html += ' <div><div style="width: 50px">' + data[i].id + '</div>\n' +
                '        <div style="width: 150px">' + data[i].name + '</div>\n' +
                '        <div style="width: 100px">' + data[i].createTime + '</div>\n' +
                '        <div style="width: 100px">' + (data[i].isShow == 1 ? '是' : '否') + '</div>\n' +
                '            <div style="width: 50px">\n' +
                '                <div><a href="javascript:edit(' + data[i].id + ')" >编辑</a></div>\n' +
                '                <div><a href="javascript:del(' + data[i].id + ')" >删除</a></div>\n' +
                '            </div>\n' +
                '        </div>';
        }
    }
    $("#findAll").html(html);
}